package com.hope.onlinestudy.fragment.userbuy

import android.support.v7.widget.GridLayoutManager
import com.hope.onlinestudy.R
import com.hope.onlinestudy.adapter.BuyLessonAdapter
import com.hope.onlinestudy.model.UserBoy
import com.hope.onlinestudy.mvp.MVPBaseFragment
import kotlinx.android.synthetic.main.layout_recyclerview.*

/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */
class UserBuyFragment :
    MVPBaseFragment<UserBuyContract.View, UserBuyPresenter>(),
    UserBuyContract.View {
    private val lessonAdapter: BuyLessonAdapter<UserBoy> by lazy {
        BuyLessonAdapter<UserBoy>(
            activity!!
        )
    }

    override fun initView(): Int {
        return R.layout.layout_recyclerview
    }

    override fun bindData() {
        rcvList.layoutManager = GridLayoutManager(activity, 2)
        rcvList.adapter = lessonAdapter
    }

    override fun lazyLoad() {
    }
}